@IF "%SetEnvFlags%"=="1" goto ExecGen

@Call SetEnv.bat

:ExecGen
@REM ==================================================================
@SET RootPath=..\..
@SET CS_OutputDirectory=%RootPath%
@REM ==================================================================

@pushd.
@cd Templates

@REM Clear old generated files
@DEL "%CS_OutputDirectory%\Runda.EShop.Common.Entity\Generated\*.cs"
@DEL "%CS_OutputDirectory%\Runda.EShop.Dal\Generated\*.cs"
@DEL "%CS_OutputDirectory%\Runda.EShop.Bll\Generated\*.cs"

@echo Generating all C# code
@echo "%CS_OutputDirectory%\Runda.EShop.Common.Entity\Generated\*.cs"
cs BuildAll_CS.csp /p:OutputDirectory="%CS_OutputDirectory%"

@popd

pause